define(function(require,exports,module){
	/**--tmpl-require--**/
	
	//加载依赖
	require("ajaxproxy");
	var common = require("common");

	//初始化AjaxProxy插件
	$('.ajaxproxy').AjaxProxy({
		dataType : "json",
		method : "post",
		formId : "content-add-form",
		formCheckHandler : function(form_id) {
			return common.formCheckHandler(form_id, true);
		},
		callbackDelay : __global.jdialog.timer,
		timeInterval : __global.jdialog.timer,
		callBack : function (data) {   /* 执行ajax之后的回调函数 */
			common.ajaxCallback(data);
		}
	});

	exports.upload = function(configs) {
		require('jupload');
		$("#upload").JUpload({
			url : "/admin/upload/upload?fileInputName=src",  //后台上传路径
			max_filenum : 5,
			src : "src",
			datas : configs.datas,
			image_container : "image-box",
			onSuccess:configs.onSuccess,
		});

	}

	exports.init = function(){
		/**--tmpl-todo--**/

				/**-- editor --**/
				require('editor');
				var editor;
				editor = KindEditor.create('#editor-content', {
					uploadJson : '/admin/upload/kindeditor_upload',
					allowFileManager : true,
					afterBlur: function(){this.sync();}
				});
				


	};
	/**--tmpl-otherfunction--**/
});
